package com.xy.work.template.app.service.mongo.impl;
import com.xy.work.template.app.domain.mongo.MLoginDeviceRecord;
import com.xy.work.template.app.service.mongo.MLoginDevice;
import com.xy.work.template.base.service.impl.BaseMongoServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.mongodb.core.MongoTemplate;
import org.springframework.stereotype.Service;
/**
 * @author niuniu
 * @Date: 2021/8/23 17:55
 * @Description: 完成一些登录mongodb 操作
 */
@Service
public class MLoginDeviceImpl extends BaseMongoServiceImpl<MLoginDeviceRecord> implements MLoginDevice {
    @Autowired
    @Qualifier("slaveMongoTemplate")
    private MongoTemplate slaveMongoTemplate;
    @Override
    public MongoTemplate getMongoTemplate() {
        return slaveMongoTemplate;
    }

    @Override
    public void addLoginDevice(MLoginDeviceRecord mLoginDeviceRecord) {
        this.save(mLoginDeviceRecord);
    }
}
